package com.ilink.teacherservice.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ilink.ilinkcommon.domain.PO.studyservice.UserCourseStudyStatus;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <h3>new-ilink-java-backend-psy</h3>
 *
 * @Description <p>用于记录用户学习课程的状态</p>
 * @Author pengshiyao
 * @Date 2024-10-09 00:03
 **/
@Mapper
public interface UserCourseStudyStatusMapper extends BaseMapper<UserCourseStudyStatus> {

    @Update("UPDATE user_course_study_status SET user_study_status = #{userStudyStatus} WHERE user_id = #{userId} AND course_id = #{courseId}")
    int updateUserStudyStatus(@Param("userId") String userId,
                              @Param("courseId") Long courseId,
                              @Param("userStudyStatus") Integer userStudyStatus);
}

